[t:/]$ 지식_

서브라임 텍스트 + ctags 쓰기

2012/08/28

서브라임 텍스트.. 요즘 좀 유행하는 듯..

https://www.google.co.kr/search?q=sublime+text&hl=ko&newwindow=1&prmd=imvnsul&source=lnms&tbm=isch&sa=X&ei=OF48UN6pDO6UiQfTsYFo&ved=0CAgQ_AUoAQ&biw=1050&bih=820

먼저 플러그인을 쉽게 설치하는 플러그인을 깔자

http://wbond.net/sublime_packages/package_control

위 문서대로 콘솔에서 설치가 안 된다면.. 그냥 다운 받아서 경로에 넣고 재시작 하면 된다.

콘솔 열기는 ctrl+` 키다. 퀘이크!!

콘솔에 http://wbond.net/sublime_packages/pack ··· allation  에 있는대로 쳐 넣으면 된다.

프락시 때문에 안 될 수 있다.

그렇다면 그 페이지에서 다운로드 받아서 플러그인 위치에 깔자.

자기 계정/.config/sublime-text-2/Installed Packages/

이제 커맨드 팔렛트를 열자 ctrl+shift+p

Package로 검색해서 엔터 누르면 플러그인 목록이 줄줄 뜬다.

ctags 플러그인을 깔자.

시스템에는 ctags가 설치되어 있어야 한다. apt-get install ctags

ctags를 쓰고 싶은 소스 트리에서 ctags -R -f  .tags 를 실행한다. 커널이라면 make tags 를 실행하면 태그 파일이 생성된다.

단축키는 내 맘대로 변경했다.

커널이라면 프로젝트로 열어야 된다. 커널 씨택 파일을 인식하기 위해서 수정한다.

{
"debug"           :  false,
"ctags_command"   :  "ctags -R -f .tags",
"filters"         :  {
"source.python": {"type":"^i$"}
},
"definition_filters": {
"source.php": {"type":"^v$"}
},
"definition_current_first": true,
"show_context_menus": true,
"extra_tag_paths" :  [ [["source.python", "windows"], "C:\\Python27\\Lib\\tags", "//home//dawnsea//Work//Kernel//linux-3.2.0"]],
"extra_tag_files" : [".gemtags", "tags"]
}

[
{
"command": "navigate_to_definition",
//    "keys": ["ctrl+t", "ctrl+t"]
"keys": ["ctrl+]"]
},
{
"command": "search_for_definition",
//    "keys": ["ctrl+t", "ctrl+y"]
"keys": ["ctrl+alt+]"]
},
{
"command": "jump_back",
//    "keys": ["ctrl+t", "ctrl+b"]
"keys": ["ctrl+["]
},
{
"command": "jump_back",
"args": {"to": "last_modification"},
//    "keys": ["ctrl+t", "ctrl+m"]
"keys": ["ctrl+alt+["]
},
{
"command": "rebuild_tags",
"keys": ["ctrl+t", "ctrl+r"]
},
{
"command": "show_symbols",
"context": [
{
"key": "selector",
"match_all": true,
"operand": "source -source.css",
"operator": "equal"
}
],
"keys": ["alt+s"]
},
{
"command": "show_symbols",
"args": {"type": "multi"},
"context": [
{
"key": "selector",
"match_all": true,
"operand": "source -source.css",
"operator": "equal"
}
],
"keys": ["alt+shift+s"]
},
{ // override current default
"command": "transpose",
"context": [
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
],
"keys": ["ctrl+t"]
}
]

해당 파일은 상단 메뉴에서 접근할 수 있다.

불친절한 설명 끗~





공유하기













[t:/] is not "technology - root". dawnsea, rss